package com.easyedu.teacher.dao;

import com.easyedu.teacher.entity.query.CourseExamQuery;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author lmr
 **/
@Mapper
public interface ExamDao {

    /**
     * 功能描述: 申请考试时间
     *
     * @param courseExamQuery 1 课程考试查询数据
     * @return : int
     **/
    @Insert("insert into exam_plan(open_courses_id, teacher_id, school_year, semester, exam_week, exam_day, lesson, " +
            "exam_start_time, exam_end_time, classroom, create_time, update_time)" +
            "select open_courses_id,teacher_id,#{year},#{semester},#{week},#{day},#{lesson},#{examStartTime}," +
            "#{examEndTime},#{classroom},NOW(),NOW() from open_course where open_courses_id = #{openCoursesId}")
    int setCourseExamTime(CourseExamQuery courseExamQuery);
}
